import React, { useState } from "react";
import { List } from "antd-mobile";

function Index() {
  let [userInfo, setUser] = useState(
    JSON.parse(localStorage.getItem("userInfo"))
  );//获取用户
  console.log(userInfo);

  return (
    <div>
      <List header="用户列表">
        <img style={{width:'50px',height:'50px'}} src={userInfo.avatar} alt="" />
        <List.Item>用户名：{userInfo.nickname}</List.Item>
      </List>
    </div>
  );
}

export default Index;
